package com.ruoyi.swla2.service.impl;

import com.ruoyi.swla2.domain.BasicDma;
import com.ruoyi.swla2.mapper.BasicDmaMapper;
import com.ruoyi.swla2.service.IBasicDmaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * DMA配置Service业务层处理
 *
 * @author gdqt
 * @date 2023-06-16
 */
@Service
public class BasicDmaServiceImpl implements IBasicDmaService {
    @Autowired
    private BasicDmaMapper basicDmaMapper;

    /**
     * 查询DMA配置
     *
     * @param ID DMA配置主键
     * @return DMA配置
     */
    @Override
    public BasicDma selectBasicDmaByID(Long ID) {
        return basicDmaMapper.selectBasicDmaByID(ID);
    }

    /**
     * 查询DMA配置列表
     *
     * @param basicDma DMA配置
     * @return DMA配置
     */
    @Override
    public List<BasicDma> selectBasicDmaList(BasicDma basicDma) {
        return basicDmaMapper.selectBasicDmaList(basicDma);
    }

    /**
     * 新增DMA配置
     *
     * @param basicDma DMA配置
     * @return 结果
     */
    @Override
    public int insertBasicDma(BasicDma basicDma) {
        return basicDmaMapper.insertBasicDma(basicDma);
    }

    /**
     * 修改DMA配置
     *
     * @param basicDma DMA配置
     * @return 结果
     */
    @Override
    public int updateBasicDma(BasicDma basicDma) {
        return basicDmaMapper.updateBasicDma(basicDma);
    }

    /**
     * 批量删除DMA配置
     *
     * @param IDs 需要删除的DMA配置主键
     * @return 结果
     */
    @Override
    public int deleteBasicDmaByIDs(Long[] IDs) {
        return basicDmaMapper.deleteBasicDmaByIDs(IDs);
    }

    /**
     * 删除DMA配置信息
     *
     * @param ID DMA配置主键
     * @return 结果
     */
    @Override
    public int deleteBasicDmaByID(Long ID) {
        return basicDmaMapper.deleteBasicDmaByID(ID);
    }

    @Override
    public BasicDma getBasicDmaByAreaId(String areaId) {
        return basicDmaMapper.getBasicDmaByAreaId(areaId);
    }
}
